<?php
namespace App\Http\Controllers\H5;

use App\Http\Controllers\Controller;
use App\Services\H5\UserService;
use Illuminate\Http\Request;

class BaseController extends Controller
{
    /**
     * 获取登录信息
    */
    public function uinfo(Request $request)
    {
        $pas = $request->all();
        $h5code = isset($pas['h5code']) ? $pas['h5code'] : '';
        $code = isset($pas['code']) ? $pas['code'] : '';
        $model = new UserService();
        $uid = $model->getUid($h5code);
        $arys = [
            'code' => $code,
            'uid' => $uid,
            'h5code' => $h5code,
        ];
        return array('code' => 0, 'msg' => 'success', 'data' => $arys);
    }
}